{extend name="admin/public/base"/}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__static__/plugins/board/board.min.css">
{/block}
{block name="body"}
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">{$meta_title}</h3>
		<div class="pull-right">
		</div>
	</div>
	<div class="box-body">
		<form method="post" class="form form-horizontal" role=form>
			<div class="nav-tabs-custom">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#tab1" data-toggle="tab">基 础</a></li>
					<li><a href="#tab2" data-toggle="tab">设 计</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane fade in active" id="tab1">
						<!-- 基础 -->
						<div class="form-group">
							<label class="col-sm-2 control-label">模型标识</label>
							<div class="col-sm-8">
								<input type="text" class="form-control disabled" name="name" value="{$info['name']}" disabled>
								<span class="help-block">（请输入文档模型标识）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">模型名称</label>
							<div class="col-sm-8">
								<input type="text" class="form-control " name="title" value="{$info['title']}">
								<span class="help-block">（请输入模型的名称）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">模型图标</label>
							<div class="col-sm-8">
								<input type="text" class="form-control " name="icon" value="{$info['icon']}">
								<span class="help-block">（模型图标）</span>
							</div>
						</div>
					</div>
					<div class="tab-pane fade" id="tab2">
						<div class="form-group">
							<label class="col-sm-2 control-label">表单显示分组</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="attribute_group" value="{$info['attribute_group']}">
								<span class="help-block">（用于表单显示的分组，以及设置该模型表单排序的显示）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">表单显示排序</label>
							<div class="col-lg-10 boards" id="attribute_group_sort">
							{volist name="fields" id="field"}
								<div class="board panel panel-info">
									<div class="panel-heading">{$field_group[$key]}</div>
									<div class="panel-body">
										<div class="board-list" data-group="{$key}" data-name="attribute_sort">
										{foreach name="field" item="item" key="k"}
											<div class="board-item">
												<span data="{$item['id']}">{$item['title']} [{$item['name']}]</span>
												<input type="hidden" name="attribute_sort[{$key}][]" value="{$item['id']}"/>
											</div>
										{/foreach}
										</div>
									</div>
								</div>
							{/volist}
							<span class="help-block">（直接拖动进行排序）</span>
							</div>
						
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">列表定义</label>
							<div class="col-sm-8">
									<textarea name="list_grid" class="form-control">{$info['list_grid']}</textarea>
								<span class="help-block">（默认列表模板的展示规则）</span>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">默认搜索字段</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="search_key" value="{$info['search_key']}">
								<span class="help-block">（默认列表模板的默认搜索项）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">高级搜索字段</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="search_list" value="{$info['search_list']}">
								<span class="help-block">（默认列表模板的高级搜索项）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">列表模板</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="template_list" value="{$info['template_list']|default=''}">
								<span class="help-block">（自定义的列表模板，放在application\admin\view\content下，不写则使用默认模板）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">新增模板</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="template_add" value="{$info['template_add']|default=''}">
								<span class="help-block">（自定义的新增模板，放在application\admin\view\content下，不写则使用默认模板）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">编辑模板</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="template_edit" value="{$info['template_edit']|default=''}">
								<span class="help-block">（自定义的编辑模板，放在application\admin\view\content下，不写则使用默认模板）</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">列表数据大小</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="list_row" value="{$info['list_row']|default=''}">
								<span class="help-block">（默认列表模板的分页属性）</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<input type="hidden" name="id" value="{$info['id']}">
					<button type="submit" class="btn btn-success submit-btn">确认提交</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}